class_name 金刚罩
extends Node2D
@onready var life_timer: Timer = $LifeTimer

signal is_timeout

var direction: Vector2
var source_peer_id: int
var damage: int = 1

var follow:Node2D


func _ready() -> void:
	life_timer.timeout.connect(_on_life_timer_timeout.bind())




func _process(delta: float) -> void:
	if follow:
		global_position = follow.global_position
	


func start(follow_context:Node2D):
	follow = follow_context



func  _on_life_timer_timeout():
	if is_multiplayer_authority():
		is_timeout.emit()
	queue_free()
